package cn.vcjf.washcar.system.controller;

import cn.vcjf.washcar.common.service.SysShiroService;
import cn.vcjf.washcar.common.web.TableResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SysLoginController {
	@Qualifier("sysShiroServiceImpl")
	@Autowired
	private SysShiroService loginService;
	@RequestMapping("/loginUI")
	public String login(){
		return "index";
	}
	/**登录操作*/
	@RequestMapping("/login")
	@ResponseBody
	public TableResult login(String username, String password){
		System.out.println(username+"/"+password);
	    loginService.login(username, password);
		return TableResult.Result();
	}
}
